package org.bioversityinternational.mgbms.model.domain;

// Generated 13 oct. 2011 12:11:05 by Hibernate Tools 3.4.0.CR1

import java.util.Date;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;
import javax.persistence.UniqueConstraint;

/**
 * PreIndexingTag generated by hbm2java
 */
@Entity
@Table(name = "PreIndexingTag", schema = "dbo", catalog = "imgbms", uniqueConstraints = @UniqueConstraint(columnNames = {
		"activityId", "materialId" }))
public class PreIndexingTag implements java.io.Serializable {

	private int id;
	private Activity activity;
	private Centre centre;
	private Material material;
	private Date shippingDate;
	private Date resultDate;
	private String notes;

	public PreIndexingTag() {
	}

	public PreIndexingTag(int id, Activity activity, Material material) {
		this.id = id;
		this.activity = activity;
		this.material = material;
	}

	public PreIndexingTag(int id, Activity activity, Centre centre,
			Material material, Date shippingDate, Date resultDate, String notes) {
		this.id = id;
		this.activity = activity;
		this.centre = centre;
		this.material = material;
		this.shippingDate = shippingDate;
		this.resultDate = resultDate;
		this.notes = notes;
	}

	@Id
	@Column(name = "id", unique = true, nullable = false)
	public int getId() {
		return this.id;
	}

	public void setId(int id) {
		this.id = id;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "activityId", nullable = false)
	public Activity getActivity() {
		return this.activity;
	}

	public void setActivity(Activity activity) {
		this.activity = activity;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "centreId")
	public Centre getCentre() {
		return this.centre;
	}

	public void setCentre(Centre centre) {
		this.centre = centre;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "materialId", nullable = false)
	public Material getMaterial() {
		return this.material;
	}

	public void setMaterial(Material material) {
		this.material = material;
	}

	@Temporal(TemporalType.TIMESTAMP)
	@Column(name = "shippingDate", length = 23)
	public Date getShippingDate() {
		return this.shippingDate;
	}

	public void setShippingDate(Date shippingDate) {
		this.shippingDate = shippingDate;
	}

	@Temporal(TemporalType.TIMESTAMP)
	@Column(name = "resultDate", length = 23)
	public Date getResultDate() {
		return this.resultDate;
	}

	public void setResultDate(Date resultDate) {
		this.resultDate = resultDate;
	}

	@Column(name = "notes", length = 50)
	public String getNotes() {
		return this.notes;
	}

	public void setNotes(String notes) {
		this.notes = notes;
	}

}
